Skip to content

⚠️ Drop revisionHistory in MachineDeployment #12274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 26, 2025

Conversation

sbueringer
Copy link
Member

@sbueringer sbueringer commented May 22, 2025

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #10479
Part of #10852

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 22, 2025
@k8s-ci-robot k8s-ci-robot requested review from elmiko and g-gaston May 22, 2025 18:57
@k8s-ci-robot k8s-ci-robot added the do-not-merge/needs-area PR is missing an area label label May 22, 2025
@sbueringer sbueringer mentioned this pull request May 22, 2025
79 tasks
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label May 22, 2025
@sbueringer sbueringer added the area/machinedeployment Issues or PRs related to machinedeployments label May 22, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/needs-area PR is missing an area label label May 22, 2025
@sbueringer
Copy link
Member Author

WIP => needs rebase after #12262 is merged

@sbueringer sbueringer force-pushed the pr-drop-rev-mgmt branch 2 times, most recently from 5077a89 to 7207195 Compare May 22, 2025 19:09
@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-main

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 23, 2025
@sbueringer sbueringer changed the title [WIP] ⚠️ Drop revisionHistory in MachineDeployment ⚠️ Drop revisionHistory in MachineDeployment May 23, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 23, 2025
@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-main

// revisionHistoryAnnotation maintains the history of all old revisions that a machine set has served for a machine deployment.
//
// Deprecated: This annotation is deprecated and is going to be removed in the next release.
const revisionHistoryAnnotation = "machinedeployment.clusters.x-k8s.io/revision-history"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This annotation will be removed in a follow-up (tracked in #10852)

Main goal of this PR is to drop the user-facing revision history feature

@chrischdi
Copy link
Member

/lgtm

/retest

Flake?


capi-e2e: [It] When using the autoscaler with Cluster API using ClusterClass [ClusterClass] Should create a workload cluster [ClusterClass] expand_less | 8m38s
-- | --
{Timed out after 300.001s. The function passed to Eventually failed at /home/prow/go/src/sigs.k8s.io/cluster-api/test/framework/machinedeployment_helpers.go:806 with: MachineDeployment autoscaler-3lm078/autoscaler-sh1cdc-md-0-wcqcd status.replicas should match expected replicas Expected     <int32>: 2 to equal     <int32>: 3 failed [FAILED] Timed out after 300.001s. The function passed to Eventually failed at /home/prow/go/src/sigs.k8s.io/cluster-api/test/framework/machinedeployment_helpers.go:806 with: MachineDeployment autoscaler-3lm078/autoscaler-sh1cdc-md-0-wcqcd status.replicas should match expected replicas Expected     <int32>: 2 to equal     <int32>: 3 In [It] at: /home/prow/go/src/sigs.k8s.io/cluster-api/test/framework/machinedeployment_helpers.go:807 @ 05/23/25 09:37:58.946 }

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 23, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 975dd6c1aa0bf9ed86693b6ee5baa0599a2e2214

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 23, 2025
@k8s-ci-robot k8s-ci-robot requested a review from chrischdi May 23, 2025 14:35
@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-main

@sbueringer
Copy link
Member Author

Had to rebase because of conflict in golangci-lint config file

@@ -127,7 +127,8 @@ proposal because most of the changes described below are a consequence of the wo
- Support for terminal errors has been dropped.
- `status.failureReason` and `status.failureMessage` will continue to exist temporarily under `status.deprecated.v1beta1`.
- The const values for `Failed` phase has been deprecated in the enum type for `status.phase` (controllers are not setting this value anymore)
- The `status.phases` field is now computed using the same logic used for `ScalingUp` and `ScalingDown` conditions.
- The `status.phases` field is now computed using the same logic used for `ScalingUp` and `ScalingDown` conditions.
- The `spec.revisionHistoryLimit` field has been removed. The MachineDeployment controller will now clean up all MachineSets without replicas.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you don't mind, let's also document that the machinedeployment.clusters.x-k8s.io/revision-history annotation is removed and remove the annotation from https://cluster-api.sigs.k8s.io/reference/api/labels-and-annotations

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

Nice!
Revision history existed since when MD where copied from Deployments, but we never nailed down implications (e.g. downgrades), and, as we discovered when bringing up this topic at the office hours, it looks like that with ClusterClass and GitOps folks stopped caring.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 26, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 71b215a156bed9f6f105eb6175b530cac1335399

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 26, 2025
@k8s-ci-robot k8s-ci-robot merged commit b81c292 into kubernetes-sigs:main May 26, 2025
19 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.11 milestone May 26, 2025
@sbueringer sbueringer deleted the pr-drop-rev-mgmt branch May 26, 2025 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/machinedeployment Issues or PRs related to machinedeployments cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove revision management in MachineDeployments
4 participants